<%@ page import="com.lengmou.service.TypeService" %>
<%@ page import="com.lengmou.entity.Goods" %>
<%@ page import="com.lengmou.entity.Type" %>
<%@ page import="com.lengmou.service.impl.TypeServiceImpl" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" trimDirectiveWhitespaces="true" errorPage="error.jsp" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
  <head>
    <meta charset="UTF-8">
    <meta name="apple-mobile-web-app-title" content="魔法集市">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=1200">
    <meta name="keywords" content="GSC,寿屋,万代,眼镜工厂,千值练,海洋堂,粘土人,MAXFACTORY,ALTER,良笑,三丽鸥,Sanrio,Takaratomy,KADOKAWA,Chara-ani,AmiAmi,手办自营,周边自营,谷子自营">
    <meta name="description" content="魔法集市·自营是专注于二次元的日本代购网站以及动漫周边自营零售网站，为用户提供快捷方便的游戏动漫代购，ACG周边、声优周边、同人商品及其他日系商品一应俱全，目前支持日本亚马逊、虎穴(虎之穴)、骏河屋、Book-off、C-queen(K-books)和Melonbooks(蜜瓜)等网站的代购。与此同时，魔法集市・自营整合来自日本的第一手货源，为大家精心挑选了各种热门人气商品。所有商品均从魔法集市的日本仓库打包发出，配合全新的「喵急便」物流服务直接送达您的手中，您将能获得焕然一新的消费体验">
    <link rel="icon" href="http://masadora-js.masadora.net/static/new_masadora/images/favicon/masadora-icon.png">
    <link rel="apple-touch-icon" href="http://masadora-js.masadora.net/static/new_masadora/images/favicon/masadora-icon.png">
    <link rel="apple-touch-icon-precomposed" href="http://masadora-js.masadora.net/static/new_masadora/images/favicon/masadora-icon.png">
      <script src="js/jquery-3.1.0.js"></script>
      <script>
          $(function () {
              var a = 1;
              var b = 1;
            $('a[action="前一页"]').click(function () {
                if(a==1){
                    $(this).prev().css({'transform':'translate3d(0px, 0px, 0px)'});
                    a++;
                }else if(a==2){
                    $(this).prev().css({'transform':'translate3d(-1096px, 0px, 0px)'});
                    a=1;
                }
            })
              $('a[action="后一页"]').click(function () {
                  if(b==1){
                      $(this).prev().prev().css({'transform':'translate3d(-1096px, 0px, 0px)'});
                      b++;
                  }else if(b==2){
                      $(this).prev().prev().css({'transform':'translate3d(0px, 0px, 0px)'});
                      b=1;
                  }
              })
          })
      </script>
    <title>女人天堂购物中心</title>
  </head>
  <body>
  <%@include file="header.jsp"%>
  <div class="bg-pink bg-home" >
    <div class="ui-layout">
      <div class="view-home-block-box">
      <div class="head">
        <a href="list.jsp">查看更多</a>
        <h3>站长推荐</h3></div>
      <div class="body">
        <div class="ui-good-slide-box">
          <div class="list">
            <c:forEach items="${recList}" var="goods">
              <%
                TypeService ts = new TypeServiceImpl();
                Goods goods = (Goods) pageContext.getAttribute("goods");
                Type type = ts.queryTypeById(goods.getType());
                pageContext.setAttribute("tp",type);
              %>
              <a class="item" href="goodsinfo.jsp?goodsid=${goods.id}">
                <div class="cover-box">
                  <img src="${goods.img}"></div>
                <div class="info-box">
                  <h4>${goods.goodsname}</h4>
                  <div class="price">${goods.price}</div>
                  <div class="tags-box">
                    <span>${tp.name}</span>
                      <%--<span>跨境购</span>--%>
                  </div>
                </div>
              </a>
            </c:forEach>
          </div>
          <a action="前一页"></a>
          <a action="后一页"></a>
        </div>
      </div>
    </div>
      <div class="view-home-block-box">
        <div class="head">
          <a href="list.jsp">查看更多</a>
          <h3>周边手办</h3></div>
        <div class="body">
          <div class="ui-good-slide-box">
            <div class="list">
              <c:forEach items="${perList}" var="goods">
                <%
                  TypeService ts = new TypeServiceImpl();
                  Goods goods = (Goods) pageContext.getAttribute("goods");
                  Type type = ts.queryTypeById(goods.getType());
                  pageContext.setAttribute("tp",type);
                %>
                <a class="item" href="goodsinfo.jsp?goodsid=${goods.id}">
                  <div class="cover-box">
                    <img src="${goods.img}"></div>
                  <div class="info-box">
                    <h4>${goods.goodsname}</h4>
                    <div class="price">${goods.price}</div>
                    <div class="tags-box">
                      <span>${tp.name}</span>
                        <%--<span>跨境购</span>--%>
                    </div>
                  </div>
                </a>
              </c:forEach>
            </div>
            <a action="前一页"></a>
            <a action="后一页"></a>
          </div>
        </div>
      </div>
      <div class="view-home-block-box">
        <div class="head">
          <a href="list.jsp">查看更多</a>
          <h3>电子好物</h3></div>
        <div class="body">
          <div class="ui-good-slide-box">
            <div class="list">
              <c:forEach items="${elcList}" var="goods">
                <%
                  TypeService ts = new TypeServiceImpl();
                  Goods goods = (Goods) pageContext.getAttribute("goods");
                  Type type = ts.queryTypeById(goods.getType());
                  pageContext.setAttribute("tp",type);
                %>
                <a class="item" href="goodsinfo.jsp?goodsid=${goods.id}">
                  <div class="cover-box">
                    <img src="${goods.img}"></div>
                  <div class="info-box">
                    <h4>${goods.goodsname}</h4>
                    <div class="price">${goods.price}</div>
                    <div class="tags-box">
                      <span>${tp.name}</span>
                        <%--<span>跨境购</span>--%>
                    </div>
                  </div>
                </a>
              </c:forEach>
            </div>
            <a action="前一页"></a>
            <a action="后一页"></a>
          </div>
        </div>
      </div>
      <div class="view-home-block-box">
        <div class="head">
          <a href="list.jsp">查看更多</a>
          <h3>日常实用</h3></div>
        <div class="body">
          <div class="ui-good-slide-box">
            <div class="list">
              <c:forEach items="${dayList}" var="goods">
                <%
                  TypeService ts = new TypeServiceImpl();
                  Goods goods = (Goods) pageContext.getAttribute("goods");
                  Type type = ts.queryTypeById(goods.getType());
                  pageContext.setAttribute("tp",type);
                %>
                <a class="item" href="goodsinfo.jsp?goodsid=${goods.id}">
                  <div class="cover-box">
                    <img src="${goods.img}"></div>
                  <div class="info-box">
                    <h4>${goods.goodsname}</h4>
                    <div class="price">${goods.price}</div>
                    <div class="tags-box">
                      <span>${tp.name}</span>
                        <%--<span>跨境购</span>--%>
                    </div>
                  </div>
                </a>
              </c:forEach>
            </div>
            <a action="前一页"></a>
            <a action="后一页"></a>
          </div>
        </div>
      </div>
    </div>
  </div>
  <%@include file="foot.jsp"%>
  <div id="page_end_html">
    <script src="https://cdn.jsdelivr.net/npm/live2d-widget@3.0.4/lib/L2Dwidget.min.js"></script>
    <script type="text/javascript">
        L2Dwidget.init();
    </script>
  </div>
  </body>
</html>
